#include "Includes.h"
#define cube_pick_up 0
#define cube_put_down 1

#define Cylinder_Hook_State_Lock_key  vexRT[Btn6D]
///////////////////////////////////////////////////////////////////////////////////////
void Cylinder_Hook_Func(int status)
{
	SensorValue[Cylinder_Hook]=status;
}
////
void Cylinder_Hook_Handle()
{
	if( Cylinder_Hook_State_Lock==false )
	{
		if(vexRT[Btn6U])
			Cylinder_Hook_Func(cube_put_down);
		else
			Cylinder_Hook_Func(cube_pick_up);
	}
	else // true
	{
		if( vexRT[Btn6U] )
		{
			Cylinder_Hook_State_Lock=false;
			Cylinder_Hook_Func(cube_pick_up);
		}
		else
		{}//noop
	}

	if(Cylinder_Hook_State_Lock_key)
	{
		while(Cylinder_Hook_State_Lock_key);
		Cylinder_Hook_State_Lock=true;
		Cylinder_Hook_Func(cube_put_down);
	}
}
